﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec"
	uri="http://www.springframework.org/security/tags"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />

<!DOCTYPE html>
<html lang="zh-CN">
<head>

<%@ include file="/WEB-INF/include/meta.jsp"%>
<%@ include file="/WEB-INF/include/css.jsp"%>

<link href="${ctx.resource}/css/shiftform.css" rel="stylesheet">
<link href="${ctx.resource}/css/select2.css" rel="stylesheet">
<link href="${ctx.resource}/css/select2-bootstrap.css" rel="stylesheet">

<title></title>

</head>

<body>

	<%@ include file="/WEB-INF/include/header.jsp"%>

	<%@ include file="/WEB-INF/include/menu.jsp"%>

	<div class="container main-content">

		<div class="panel panel-default beast-panel beast-panel-layout">

			<div class="panel-heading">
				<ol class="breadcrumb">
					<li><a href="${ctx.host}/customer">任务管理</a></li>
					<li class="active">广告管理</li>
				</ol>
			</div>

			<div class="panel-body">

				<div class="col-xs-2 beast-panel-layout-left no-horizontal-padding">
					<%@ include file="/WEB-INF/include/submenu.jsp"%>
				</div>

				<div class="col-xs-10 beast-panel-layout-right">

					<div class="beast-breadcrumb-wrapper">
						<div class="beast-breadcrumb clearfix">
							<h2>
								<i class="glyphicon glyphicon-fire" title="广告管理"></i>&nbsp;&nbsp;<span>广告管理&nbsp;-&nbsp;审核详情</span>
							</h2>
						</div>
					</div>

					<div class="beast-toolbar-wrapper top-margin-20 clearfix">
						<div class="text-right"
							style="padding-top: 10px; padding-bottom: 10px; border-bottom: 2px solid #CCC;">
							<button type="button"
								class="btn btn-default btn-shadow btn-shadow-default demo2do-btn"
								onclick="window.location.href='javascript:history.go(-1)'">
								<i class="glyphicon glyphicon-arrow-left"></i>&nbsp;&nbsp;返回
							</button>
							<a href="${ctx.host}/advertisement-audits/${id}/pass"
								data-toggle="modal" data-target="#"
								class="btn btn-success btn-shadow btn-shadow-success demo2do-btn"><i
								class="glyphicon glyphicon-arrow-left"></i>&nbsp;&nbsp;审核通过</a>
						  <a href="${ctx.host}/advertisement-audits/${id}/unpass" 
						    data-toggle="modal" data-target="#"  
						    class="btn btn-success btn-shadow btn-shadow-success demo2do-btn" ><i 
						    class="glyphicon glyphicon-arrow-left"></i>&nbsp;&nbsp;审核不通过</a>
						  
						</div>
					</div>
					<div class="row">
						<div class="col-xs-7">
							<div class="beast-breadcrumb-wrapper top-margin-20">
								<div class="beast-breadcrumb yellow clearfix">
									<h2>
										<span>基本信息</span>
									</h2>
								</div>
							</div>

							<div class="form-horizontal bottom-margin-20">

								<div class="form-group">
									<label class="col-xs-3 control-label">投放名称：</label>
									<div class="col-xs-8 pull-left">
										<p class="form-control-static">${advertisement.adTitle }</p>
									</div>
								</div>
								<div class="form-group">
									<label class="col-xs-3 control-label">广告主名：</label>
									<div class="col-xs-8 pull-left">
										<p class="form-control-static">
											<a href="${advertisement.aduser.company.website }"
												target="_BLANK">${advertisement.aduser.profile.userName }</a>
										</p>
									</div>
								</div>
								<div class="form-group">
									<label class="col-xs-3 control-label">创建时间：</label>
									<div class="col-xs-8 pull-left">
										<p class="form-control-static">
											<fmt:formatDate value="${advertisement.createDate}"
												pattern="yyyy-MM-dd" />
										</p>
									</div>
								</div>
								<div class="form-group">
									<label class="col-xs-3 control-label">投放时间：</label>
									<div class="col-xs-8 pull-left">
										<p class="form-control-static">
											<fmt:formatDate value="${advertisement.startDate }"
												pattern="yyyy-MM-dd" />
											&nbsp;-&nbsp;
											<fmt:formatDate value="${advertisement.endDate }"
												pattern="yyyy-MM-dd" />
										</p>
									</div>
								</div>
							</div>

						</div>
						<div class="col-xs-5">
							<div class="beast-box" style="margin-top: 20px;">
								<div class="clearfix box-bar beast-box-bar beast-box-header">
									<h2 class="pull-left">审核流程</h2>
								</div>
								<div class="clearfix beast-box-item">
									<label class="pull-left">1.&nbsp;&nbsp;查看&nbsp;<span
										style="color: #ff8111">基本信息</span>：确认基本信息是否&nbsp;<span
										style="color: #ff8111">出错</span>。
									</label>
								</div>
								<div class="clearfix beast-box-item">
									<label class="pull-left">2.&nbsp;&nbsp;填写&nbsp;<span
										style="color: #ff8111">基本信息</span>：&nbsp;<span
										style="color: #ff8111">点击编辑</span>完善信息。
									</label>
								</div>
								<div class="clearfix beast-box-item">
									<label class="pull-left">3.&nbsp;&nbsp;点击&nbsp;<span
										style="color: #ff8111">审核通过</span></label>
								</div>
							</div>
						</div>
					</div>



					<div class="beast-breadcrumb-wrapper top-margin-20">
						<div class="beast-breadcrumb yellow clearfix">
							<h2>
								<span>投放要求</span>
							</h2>
						</div>

					</div>

					<div class="form-horizontal bottom-margin-20">

						<div class="form-group">
							<label class="col-xs-2 control-label">投放平台：</label>
							<div class="col-xs-4 pull-left">
								<p class="form-control-static">${advertisement.socialType.description }</p>
							</div>
							<label class="col-xs-2 control-label">投放目标：</label>
							<div class="col-xs-4 pull-left">
								<c:choose>
									<c:when test="${advertisement.type eq 'BUDGET'}">
										<p class="form-control-static">${advertisement.putNumber}&nbsp;元</p>
									</c:when>
									<c:when test="${advertisement.type eq 'QUANTITY'}">
										<p class="form-control-static">${advertisement.putNumber}&nbsp;阅读量</p>
									</c:when>
								</c:choose>
							</div>
						</div>

						<div class="form-group">
							<label class="col-xs-2 control-label">投放类型：</label>
							<div class="col-xs-4 pull-left">
								<p class="form-control-static">${advertisement.type.description}</p>
							</div>
							<label class="col-xs-2 control-label">已完成：</label>
							<div class="col-xs-4 pull-left">
								<p class="form-control-static">
				                  <c:choose>
				                    <c:when test="${advertisement.type eq 'BUDGET'}">
				                      ${advertisement.claimNumber}&nbsp;
				                    </c:when>
				                    <c:when test="${advertisement.type eq 'QUANTITY'}">
				                      ${advertisement.claimNumber}&nbsp;阅读量
				                    </c:when>
				                  </c:choose>
				                </p>
							</div>
						</div>

					</div>

					<div class="beast-breadcrumb-wrapper top-margin-20">
						<div class="beast-breadcrumb yellow clearfix">
							<h2>
								<span>投放标签</span>
							</h2>
						</div>
					</div>


					<div class="form-horizontal bottom-margin-20">

						<div class="form-group">
							<label class="col-xs-2 control-label">兴趣标签：</label>
							<div class="col-xs-4 pull-left">
								<p class="form-control-static">
									<c:forEach var="interestTagCode"
										items="${advertisement.advertisementTag.stringInterestTagCodes}">
										<label class="label label-outline label-info">${persist.interestTags[interestTagCode].name}</label>
									</c:forEach>
								</p>
							</div>
							<label class="col-xs-2 control-label">生活标签：</label>
							<div class="col-xs-4 pull-left">
								<p class="form-control-static">
									<c:forEach var="lifeTagCode"
										items="${advertisement.advertisementTag.stringLifeTagCodes}">
										<label class="label label-outline label-info">${persist.lifeTags[lifeTagCode].name}</label>
									</c:forEach>
								</p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-xs-2 control-label">性别标签：</label>
							<div class="col-xs-4 pull-left">
								<p class="form-control-static">
									<c:forEach var="sexTagCode"
										items="${advertisement.advertisementTag.stringSexTag}">
										<label class="label label-outline label-info">${persist.sexTags[sexTagCode].name}</label>
									</c:forEach>
								</p>
							</div>
							
							<label class="col-xs-2 control-label">地域标签：</label>
							<div class="col-xs-4 pull-left">
								<p class="form-control-static">
									<c:forEach var="areaTagCode"
										items="${advertisement.advertisementTag.stringAreaTag}">
										<label class="label label-outline label-info">${persist.areaTags[areaTagCode].name}</label>
									</c:forEach>
								</p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-xs-2 control-label">年龄标签：</label>
							
							<div class="col-xs-4 pull-left">
								<p class="form-control-static">
									<c:forEach var="ageTagCode"
										items="${advertisement.advertisementTag.stringAgeTag}">
										<label class="label label-outline label-info">${persist.ageTags[ageTagCode].name}</label>
									</c:forEach>
								</p>
							</div>
							
						</div>

					</div>

					<div class="beast-breadcrumb-wrapper top-margin-20">
						<div class="beast-breadcrumb yellow clearfix">
							<h2>
								<span>广告素材</span>
							</h2>
						</div>
					</div>

					<div class="form-horizontal bottom-margin-20">

						<div class="form-group">
							<label class="col-xs-2 control-label">文字描述：</label>
							<div class="col-xs-9 col-xs-offset-2">
								<p class="form-control-static">${advertisement.material.description }</p>
							</div>
						</div>
						<c:choose>
							<c:when test="${advertisement.material.type.name eq 'GRAPHIC'}">
								<div class="form-group">
									<label class="col-xs-2 control-label">图文素材：</label>
									<div class="col-xs-9 col-xs-offset-2">
										<div class="row">
											<c:forEach var="materialImage"
												items="${advertisement.material.materialImages}">
												<div class="col-md-2">
													<img src="${ctx.qiniu}/${materialImage.image}!200">
												</div>
											</c:forEach>
										</div>
									</div>
								</div>
							</c:when>
							<c:otherwise>
								<div class="form-group">
									<label class="col-xs-2 control-label">链接素材：</label>
									<div class="col-xs-9 col-xs-offset-2">
										<textarea class="form-control" rows="3" readonly>${advertisement.material.link}</textarea>
									</div>
								</div>
							</c:otherwise>
						</c:choose>

					</div>

				</div>
			</div>

		</div>

	</div>

	<%@ include file="/WEB-INF/include/footer.jsp"%>
	<%@ include file="/WEB-INF/include/script.jsp"%>
	<script src="${ctx.resource}/js/shiftform.js"></script>
	<script src="${ctx.resource}/js/select2.min.js"></script>
	<script src="${ctx.resource}/js/select2_locale_zh-CN.js"></script>


</body>

</html>
